Q3View_GetFrustumToWindowMatrixState
You can use theQ3View_GetFrustumToWindowMatrixState
function to get a view's frustum-to-window transform matrix.
TQ3Status Q3View_GetFrustumToWindowMatrixState ( TQ3ViewObject view, TQ3Matrix4x4 *matrix);
view
- A view.
matrix
- On exit, a 4-by-4 matrix representing the frustum-to-window transform of the specified view.
DESCRIPTION
TheQ3View_GetFrustumToWindowMatrixState
function returns, in thematrix
parameter, a 4-by-4 matrix that represents the frustum-to-window transform of the view specified by theview
parameter. The window is either the pixmap associated with a pixmap draw context or the window associated with a window draw context (for example, the Macintosh draw context). If, in a window system draw context, a part of a window (a pane) has been associated with the view, this function returns the matrix that maps the view frustum to that part of the window.The z value of a point pw in window space obtained by applying the transform returned by
Q3View_GetFrustumToWindowMatrixState
to a point pf in the frustum space is the z value of point pf (which ranges from 0.0 to 1.0, inclusive). You might use the z value of a transformed point to determine whether that point would be clipped (if the z value is less than 0 or greater than 1.0, the original point lies outside the viewing frustum).